home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 1878 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: ifi.uio.no!larshau
  2. From: larshau@ifi.uio.no (Lars Haugseth)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: LoadRGB4 problem.
  5. Date: 24 Jan 1996 17:57:05 +0100
  6. Organization: Dept. of Informatics, University of Oslo, Norway
  7. Message-ID: <4e5od1$570@gyda.ifi.uio.no>
  8. NNTP-Posting-Host: gyda.ifi.uio.no
  9.  
  10.  
  11.  
  12. The following code was reported to crash on Kickstart 2.04, but since
  13. I only have 3.0 I can't test it myself. Any comments?
  14.  
  15. ----------
  16.  
  17. static ULONG palette32chr[] = {
  18.    16<<16+0,
  19.    RGB32(0x000000), RGB32(0xffffff), RGB32(0xc7c7c7), RGB32(0xff9200),
  20.    RGB32(0xff0000), RGB32(0x00cd00), RGB32(0x0000fe), RGB32(0xc86400),
  21.    RGB32(0x8a8a8a), RGB32(0xe0e0e0), RGB32(0xa500ff), RGB32(0xfffd00),
  22.    RGB32(0xff00bc), RGB32(0x00ff00), RGB32(0x00c8ff), RGB32(0xffcc80),
  23.    0
  24. };
  25.  
  26. static UWORD palette4[] = {
  27.    0x000, 0xfff, 0xccc, 0xf90,
  28.    0xf00, 0x0d0, 0x00f, 0xd60,
  29.    0x999, 0xeee, 0xa0f, 0xff0,
  30.    0xf0c, 0x0f0, 0x0df, 0xfd8
  31. };
  32.  
  33.  
  34. if(v39)
  35.    LoadRGB32(&amiscr->ViewPort, palette32);      /* WORKS */
  36. else
  37.    LoadRGB4(&amiscr->ViewPort, palette4, 16);    /* CRASH! */
  38.  
  39. ----------
  40.  
  41. --
  42. Lars Haugseth <larshau@ifi.uio.no>
  43.  
  44.